#!/bin/bash

HOST=http://update.gonsincloud.com
CURRENT_PATH=${PWD}
cd ~
mkdir .active_environment
cd .active_environment

ACTIVEMQ_PATH=${PWD}
cp -rf ${CURRENT_PATH}/* ./

# download tar.gz files
wget -nc ${HOST}/docker/apache-activemq-5.16.5-bin.tar.gz apache-activemq-5.16.5-bin.tar.gz
wget -nc ${HOST}/jenkins/jdk-8u231-linux-x64.tar.gz jdk-8u231-linux-x64.tar.gz
sudo docker-compose down -v
sudo docker-compose build
sudo docker-compose up -d